<style>
	textarea.pre {
		font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
		padding: 9.5px 0 0 9.5px;
		/*display: block;*/
		font-size: 12px;
		line-height: 1.42857143;
		color: #333;
		word-break: break-all;
		word-wrap: break-word;
		background-color: #f5f5f5;
		border: 1px solid #ccc;
		border-radius: 4px;
		overflow: auto;
	}
</style>
<pre id="bas_pre" contenteditable="true" style="display: none; height: 100%;"></pre>
<pre id="the93_pre" contenteditable="true" style="display: none; height: 100%;"></pre>
<textarea id="bas_textarea" class="pre" style="display: none; height: 100%; width: 100%;" spellcheck="false"></textarea>
<textarea id="the93_textarea" class="pre" style="display: none; height: 100%; width: 100%;" spellcheck="false"></textarea>
<script>
	function win_park(bas) {
		var cell = dhxWins.findByText("01")[0];
		if (cell) {
			var f = cell['cell'].isParked();
			cell['cell'].park(!f);
		}
		var cell2 = dhxWins.findByText("02")[0];
		if (cell2) {
			var f2 = cell2['cell'].isParked();
			cell2['cell'].park(!f2);
		}
		return;
		var cell = dhxWins.findByText(bas)[0]['cell'];
		var f = cell.isParked();
		cell.park(!f);

	}
	var show_bas = function (bas, bas_str) {
		$("#bas_pre").text(bas_str);
		var title = "bas " + bas
			+ " 制作脚本&nbsp;&nbsp;&nbsp;&nbsp;<a onclick='win_park(\"" + bas
			+ "\")' >最小化</a>";
		title += "&nbsp;&nbsp;&nbsp;&nbsp;<span class='text-success'>使用脚本前请确认准确性</span>&nbsp;&nbsp;<span class='text-warning'>description是客户名自动转拼音，过长请手动删减</span>&nbsp;&nbsp;<a class='btn btn-link' onclick='showInfoWin()'>点此查看9312互联端口明细</a>";
		var _bas_conf = {};
		_bas_conf["01"] = {
			id: "aaa",
			left: 120,
			top: 30,
			width: 1000,
			height: 275,
			caption: title,
		};
		_bas_conf["02"] = {
			id: "bbb",
			left: 170,
			top: 120,
			width: 1000,
			height: 275,
			caption: title,
		};
		checkWindows(_bas_conf[bas]["id"]);
		var bas_win = dhxWins.createWindow(_bas_conf[bas]);
		bas_win.attachEvent("onParkDown", function (win) {
			var t = win.getText().replace("还原窗口", "最小化");
			win.setText(t);
		});
		bas_win.attachEvent("onParkUp", function (win) {
			var t = win.getText().replace("最小化", "还原窗口");
			win.setText(t);
		});
		bas_win.attachObject($($("#bas_pre").clone()[0])
			.prop("id", 'bas' + bas)[0]);
	}
	var show_9312 = function (device, str) {
		$("#the93_pre").text(str);
		var title = "9312 " + device;
		title += " 制作脚本&nbsp;&nbsp;&nbsp;&nbsp;<a class='btn btn-xs btn-default' onclick='closeAll()'>关闭全部</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class='btn btn-xs btn-warning'>若描述过长请手动修改</a>";
		checkWindows("ccc");
		dhxWins.createWindow({
			id: "ccc",
			left: 250,
			top: 300,
			width: 700,
			height: 295,
			caption: title,
		});
		dhxWins.window("ccc").attachObject($("#the93_pre").clone()[0]);
	}
	var closeAll = function () {
		checkWindows("aaa");
		checkWindows("bbb");
		checkWindows("ccc");
	}
</script>